import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'home',
      redirect: '/login',
      component: resolve => require(['../components/common/home.vue'], resolve),
      children: [{
          path: '/index',
          component: resolve => require(['../components/page/Index.vue'], resolve)
        },
        {
          path: '/fina/ucion', //用户币种信息
          component: resolve => require(['../components/page/usercoin.vue'], resolve)
        },
        {
          path: '/sys/menu', //菜单管理
          component: resolve => require(['../components/page/menum.vue'], resolve)
        },
        {
          path: '/sys/config', //参数配置
          component: resolve => require(['../components/page/parameter.vue'], resolve)
        },
        {
          path: '/op/user', //用户权限
          component: resolve => require(['../components/page/userman.vue'], resolve)
        },
        {
          path: '/fina/message', //短信统计
          component: resolve => require(['../components/page/messageCount.vue'], resolve)
        },
        {
          path: '/fina/coinWithdraw', //钱包提现审核
          component: resolve => require(['../components/coin/CoinWithdraw.vue'], resolve)
        },
        {
          path: '/coin/coinRecord', //钱包提现记录
          component: resolve => require(['../components/coin/CoinRecord.vue'], resolve)
        },
        // {
        //   path: '/user/userInfo', //新 用户管理
        //   component: resolve => require(['../components/user/user.vue'], resolve)
        // },
        {
          path: '/coin/contr',
          component: resolve => require(['../components/coin/CoinController.vue'], resolve)
        }

      ]
    },
    {
      path: '/login',
      name: 'login',
      component: resolve => require(['../components/login.vue'], resolve)
    }
  ]
})
